<?php
namespace app\model\admin\basic;

use app\model\admin\lineup\LineupGuideUrl;
use laytp\BaseModel;

class BasicGuide extends BaseModel
{
    protected $name = 'basic_guide';

    public function category(){
        return $this->belongsToMany(BasicLabel::class,BasicGuideLabel::class,"label_id","guide_id");
    }

    public function url(){
        return $this->hasOne(LineupGuideUrl::class,"id","guide_id")->bind(["lineup_status"=>"status","jump_url"=>"jump_url"]);
    }
}